package com.trkj.service;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.trkj.dao.jpa.CcHospFloorDAO;

@Service
@Transactional
public class CcHospFloorService {

	@Autowired
	private CcHospFloorDAO chfDAO;
	
	public Map<String,Object> queryByAll(int page,int rows){
		Map<String,Object> map=new HashMap<String,Object>();
		PageRequest pr = new PageRequest(page - 1, rows);
		map.put("total", chfDAO.count());
		map.put("rows", chfDAO.queryByAll(pr));
		return map;
	}
	
}
